<!-- 客户管理-企业列表 vue -->

<template>
    <div>
        
        <el-tabs type="border-card" @tab-click="handleClick" v-model="activeName2">
            <el-tab-pane label="通用查找" name="a">
                <baseListVue v-if="name == 'a'"></baseListVue>
            </el-tab-pane>
            <el-tab-pane label="设计单位" name="b">
            	<designListVue v-if="name == 'b'"></designListVue>
            </el-tab-pane>
            <el-tab-pane label="咨询单位" name="c">
            	<answerListVue v-if="name == 'c'"></answerListVue>
            </el-tab-pane>
            <el-tab-pane label="承建方" name="d">
            	<buildListVue v-if="name == 'd'"></buildListVue>
            </el-tab-pane>
            <el-tab-pane label="设备方" name="e">
            	<deviceListVue v-if="name == 'e'"></deviceListVue>
            </el-tab-pane>
            <el-tab-pane label="运维方" name="f">
            	<opsListVue v-if="name == 'f'"></opsListVue>
            </el-tab-pane>
            <el-tab-pane label="投资方" name="g">
                <moneyListVue v-if="name == 'g'"></moneyListVue>
            </el-tab-pane>
        </el-tabs>
        <!-- 添加企业 -->
        <el-dialog title="添加企业" :visible.sync="dialog.addCompanyDialog.open" :modal="false" size="full" v-if="dialog.addCompanyDialog.open">
            <addCompanyDialog></addCompanyDialog>
        </el-dialog>
    </div>
</template>
<script>
import Bus from '@/config/bus.js'
import baseListVue from '@/components/cust/company/list/base.vue'
import designListVue from '@/components/cust/company/list/design.vue'
import answerListVue from '@/components/cust/company/list/answer.vue'
import buildListVue from '@/components/cust/company/list/build.vue'
import deviceListVue from '@/components/cust/company/list/device.vue'
import moneyListVue from '@/components/cust/company/list/money.vue'
import opsListVue from '@/components/cust/company/list/ops.vue'
import addCompanyDialog from '@/components/cust/company/add.vue'

export default {
	components:{baseListVue,designListVue,answerListVue,buildListVue,moneyListVue,deviceListVue,opsListVue,addCompanyDialog},
    data() {
        return {
            activeName2:'a',
            name:'a',
            dialog:{
                addCompanyDialog:{
                    open:false
                }
            }
        }
    },
    methods:{
        handleClick(tab) {
            this.name = tab.name
            console.log(tab.name);
        },
        openDialog(dialog){
            this.dialog[dialog].open = true
        }
    }
}
</script>
